This coding is notably designed for the transmission and/or for the storage of digital signals such as audio frequency signals (speech, music or others).
The present invention relates more particularly to the coding of waveforms such as PCM (for “Pulse Code Modulation”) coding where each input sample is coded individually, without prediction.
The general principal of PCM coding/decoding specified by the recommendation UIT-T G.711 is such as described with reference to FIG. 1. The input signal is assumed to be defined with a minimum bandwidth of [300-3400 Hz] and sampled at 8 kHz, with a resolution of 16 bits per sample (in a format known as “linear PCM”).
The PCM coder 13 comprises a quantization module QPCM 10 which receives the input signal S at its input. The quantization index IPCM at the output of the quantization module 10 is transmitted via the transmission channel 11 to the decoder 14.
The decoder PCM 14 receives at its input the indices IPCM coming from the transmission channel, a version which could be affected by binary errors of IPCM, and carries out an inverse quantization by the inverse quantization module Q−1PCM 12 in order to obtain the coded signal S′Mic.
The normalized UIT-T G.711 PCM coding (hereinafter referred to as G.711) carries out a compression of the amplitude of the signals with a logarithmic curve prior to uniform scalar quantization, which allows an approximately constant signal-to-noise ratio to be obtained for a wide dynamic range of signals. The quantization step in the frequency range of the original signal is therefore proportional to the amplitude of the signals.
The successive samples of the compressed signal are quantized over 8 bits, or 256 levels. In the Public Switched Telephone Network (PSTN), these 8 bits are transmitted at a frequency of 8 kHz giving a bit rate of 64 kbits/s.
A quantized signal frame according to the G.711 standard is composed of quantization indices coded over 8 bits. Thus, if the inverse quantization is applied by table, it simply consists of the index pointing to one of the 256 possible decoded values.
For reasons of complexity of implementation, the PCM compression has been approximated by a segmented linear curve.
Two coding laws are defined in the G.711 standard: law A, mainly used in Europe, and mu (μ) law used in North America and in Japan.
These coding laws allow an amplitude compression (or “companding”) to be applied to the signal. The amplitude of the signal is thus “compressed” with a non-linear function in the coder, sent over a transmission channel and “decompressed” with the inverse function in the decoder. The advantage of amplitude compression is that it allows the probability distribution of the amplitude of the input audio signal to be transformed into a quasi-uniform probability law, on which a uniform scalar quantization can be applied.
The laws of amplitude compression are generally laws of the logarithmic type which therefore allow a signal sampled with a resolution of 16 bits (in “linear PCM” format) to be coded over 8 bits (in “PCM” format of the law A or mu type).
The 8 bits per sample in G.711 are allocated in the following manner such as is shown at reference 15 in FIG. 1:
1 sign bit S (0 for a negative value, otherwise 1), assigned the reference sgn in FIG. 1,
3 bits to indicate the segment (reference ID-SEG in FIG. 1), the end of each segment being given by 256*2n for the A law and 256*2n−132 for the mu law where n=0, 1, . . . , 7. The quantization step is therefore multiplied by 2 when going to the higher segment (starting from the 2nd segment for the A law).
4 bits for indicating the location on the segment, assigned the reference ID-POS in FIG. 1.
The last 7 bits therefore constitute the coded absolute value. In the following we will firstly study the case of law A, then the results are generalized for the mu law. According to the A law G.711 standard, the final index is obtained by inverting each second bit starting from the Least Significant Bit or LSB. This coding law allows a scalar quantization precision of 12 bits (hence a quantization step of 16) on the first two segments, then the precision decreases by 1 bit when the segment number increases by 1.
It can be noted that it is possible to perform the G.711 PCM quantization starting from a digital signal represented over 16 bits by carrying out simple comparisons between the amplitude of the sample to be coded and the decision thresholds of the quantifier. The use of a dichotomy significantly accelerates these comparisons. This solution requires a table with 256 entries to be stored; table 1 hereinbelow presents an extract from such a table for the G.711 law A.
TABLE 1Thresholds for searching by dichotomyN° ofCodedtheLowerUpperabsoluteFinalQuantizedintervalthresholdthresholdSignvalueindexvalue0−32768−3174501270x2a−322561−31744−3072101260x2b−31232. . .. . .. . .. . .. . .122−96−81050x50−88123−80−65040x51−72124−64−49030x56−56125−48−33020x57−40126−32−17010x54−24127−16−1000x55−8128015100xd581291631110xd4241303247120xd7401314863130xd6561326479140xd1721338095150xd088. . .. . .. . .. . .. . .254307203174311260xab31232255317443276711270xaa32256
For example, an original sample of the signal S to be coded has an amplitude equal to −75. Consequently, this amplitude is included in the interval [−80, −65] of the line 123 (or “level” 123) of the table. The coding of this information consists in delivering a coded final index, referenced I′Mic in FIG. 1 and in table 1, which is equal to 0x51. At the decoding, the inverse quantization operation therefore consists in recovering the index I′Mic=0x51 and in making a quantized value VQ, such as VQ=−72, correspond to it. Consequently, the decoding assigns this value −72 to the amplitude of the corresponding sample of the decoded signal S′Mic. It will be mentioned that this same value VQ=−72 would be assigned to all the samples to be decoded and whose initial amplitude had a value in the interval [−80, −65], being 16 possible values in all within the interval, which corresponds to the quantization step here of 16. On the other hand, it will be noted that the same value VQ=32256 would be assigned to all the samples whose initial amplitude was in the interval [31744, 32767], being 1024 possible values in all, which corresponds to a quantization step of 1024.
The signal-to-noise ratio (SNR) obtained by the PCM coding is more or less constant (˜38 dB) for a wide dynamic range of signals. The quantization step in the frequency range of the original signal is proportional to the amplitude of the signals. This signal-to-noise ratio is not sufficient to make the quantization noise inaudible over the whole band of frequencies 0-4000 Hz. Moreover, for low-level signals (which are coded with the first segment) the SNR is very poor.
The G.711 standard is generally considered as being of good quality for narrow-band telephony applications with terminals limiting the band to [300-3400 Hz]. However, the quality is not high enough when G.711 is used for other applications such as, for example, for high-fidelity terminals in the band [50, 4000 Hz] or for the wideband hierarchical extension of the G.711 coding.
For this reason, there do exist methods of hierarchical coding consisting in generating an enhancement layer determined from the coding noise of the G.711 coder. This coding noise is then coded by a technique different from G.711, which forms the layer known as ‘base layer’ (or ‘core layer’). Such a method of hierarchical coding is for example described in the document: Y. Hiwasaki, H. Ohmuro, T. Mori, S. Kurihara and A Kataoka. “A G.711 embedded wideband speech coding for VoIP conferences”, IEICE Trans. Inf. & Syst, Vol. E89-D, no 9, September 2006. This type of method has the drawback of very significantly increasing the complexity of the coder, whereas coding of the PCM type is reputed to be of low complexity. Moreover, since the PCM coding noise is a white noise, hence uncorrelated, the coding of this type of noise is difficult to implement because compression techniques are essentially based on extraction properties from the correlation of the signal to be coded.